//
//  OilCardViewController.m
//  JxCarios
//
//  Created by xcq on 15/2/11.
//  Copyright (c) 2015年 xiongchuanqi. All rights reserved.
//

#import "OilCardViewController.h"
#import "OilCardQueryViewController.h"
#import "CLUIBaseNavigationController.h"
#import "OilCardQueryListTableViewController.h"
#import "OilCardPayViewController.h"
@interface OilCardViewController ()

@end

@implementation OilCardViewController

- (void)viewWillAppear:(BOOL)animated{
    self.tabBarController.tabBar.hidden = YES;
    UIView *btn = (UIView *)[self.tabBarController.view  viewWithTag:400];
    btn.hidden = YES;
}

- (void)viewDidDisappear:(BOOL)animated{
 }

- (void)viewDidLoad {
    [super viewDidLoad];
    self.automaticallyAdjustsScrollViewInsets = NO;
    self.title = @"油卡";
    [self showNavBarWithRightTitle:nil andRightAction:nil andLeftAction:@selector(backTo) andCustom:NO];
}

- (void)backTo {
    self.tabBarController.tabBar.hidden = NO;
    UIView *btn = (UIView *)[self.tabBarController.view  viewWithTag:400];
    UIView *popView = (UIView*)[self.tabBarController.view viewWithTag:511];
    btn.hidden = NO;
    [self.tabBarController.view bringSubviewToFront:btn];
    [self.tabBarController.view bringSubviewToFront:popView];
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


- (IBAction)oilCardQueryAction:(id)sender {
//    OilCardQueryViewController *query = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"oilQuery"];
//    CLUIBaseNavigationController *nav = [[CLUIBaseNavigationController alloc] initWithRootViewController:query];
//    query.hidesBottomBarWhenPushed = YES;
//    [self.navigationController pushViewController:query animated:YES];
    OilCardQueryListTableViewController *oilList = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"oilCardList"];
    oilList.hidesBottomBarWhenPushed = YES;
    
     CLUIBaseNavigationController *nav = [[CLUIBaseNavigationController alloc] initWithRootViewController:oilList];
    [self.navigationController pushViewController:oilList animated:YES];

}

- (IBAction)chongzhiAction:(id)sender {
    
    OilCardPayViewController *oil = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"oilCardPay"];
    oil.hidesBottomBarWhenPushed = YES;
    CLUIBaseNavigationController *nav = [[CLUIBaseNavigationController alloc] initWithRootViewController:oil];
    [self.navigationController pushViewController:oil animated:YES];

}
@end
